Package com.cisco.pt.ipc.ui.impl
Class LogicalWorkspaceImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.ui.impl.LogicalWorkspaceImpl
- All Implemented Interfaces:
IPCObject,LogicalWorkspace
Information provided by the PKI file:
\class LogicalWorkspace
\brief LogicalWorkspace is a graphics view. Network design using logical topology icons happens in this space.
\example appWindow().getActiveWorkspace().getLogicalWorkspace()
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionLogicalWorkspaceImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionvoidInformation provided by the PKI file:addDevice(DeviceType type, String model, double x, double y) Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:addTextPopup(int x, int y, double layer, int width, String text) Information provided by the PKI file:voidautoConnectDevices(String device1, String device2) Information provided by the PKI file:voidcenterOn(double dx, double dy) voidbooleanchangeNoteText(UUID id, String text) Information provided by the PKI file:booleanclearLayer(double layerNumber) Information provided by the PKI file:booleancreateLink(String deviceName1, String portName1, String deviceName2, String portName2, ConnectType connType) Information provided by the PKI file:booleandeleteLink(String deviceName1, String portName1) Information provided by the PKI file:drawCircle(int cx, int cy, double layer, int radius, int r, int g, int b) Information provided by the PKI file:drawLine(int sx, int sy, int ex, int ey, double layer, int w, int r, int g, int b) Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:intgetCanvasItemRealX(UUID item_id) Information provided by the PKI file:intgetCanvasItemRealY(UUID item_id) Information provided by the PKI file:intgetCanvasItemX(UUID item_id) Information provided by the PKI file:intgetCanvasItemY(UUID item_id) Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:getCluster(String clusterId) Information provided by the PKI file:getClusterForItem(UUID itemUuid) Information provided by the PKI file:getClusterFromItem(UUID clusterItemUuid) Information provided by the PKI file:getClusterIdForItem(UUID itemUuid) Information provided by the PKI file:getClusterItemId(String clusterId) Information provided by the PKI file:intgetComponentChildCountFor(String clusterID) getComponentChildForAt(String clusterID, int index) getComponentChildForByName(String clusterID, String name) getComponentItem(String deviceName) Information provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:getEllipseItemData(UUID itemID) Information provided by the PKI file:doubleInformation provided by the PKI file:doublegetLayerInbetweenComponents(String deviceName1, String deviceName2) Information provided by the PKI file:getLineItemData(UUID itemID) Information provided by the PKI file:intInformation provided by the PKI file:getPolygonItemData(UUID itemID) Information provided by the PKI file:getRectItemData(UUID itemID) Information provided by the PKI file:Information provided by the PKI file:intgetState()Information provided by the PKI file:doubleInformation provided by the PKI file:getWorkspaceImage(String format) Information provided by the PKI file:booleanisLayerUsed(double layer) Information provided by the PKI file:voidmoveCanvasItemBy(UUID item_id, int dx, int dy) Information provided by the PKI file:voidmoveItemToCluster(UUID itemUuid, String clusterId) Information provided by the PKI file:booleanmoveRemoteNetwork(String name, int x, int y) Information provided by the PKI file:booleanremoveCanvasItem(UUID id) Information provided by the PKI file:voidremoveCluster(String clusterId, boolean uncluster) Information provided by the PKI file:booleanremoveDevice(String deviceName) Information provided by the PKI file:booleanremoveRemoteNetwork(String name) Information provided by the PKI file:booleanremoveTextPopup(UUID id) Information provided by the PKI file:voidsetCanvasItemRealPos(UUID item_id, int x, int y) Information provided by the PKI file:voidsetCanvasItemX(UUID item_id, int x) Information provided by the PKI file:voidsetCanvasItemY(UUID item_id, int y) Information provided by the PKI file:voidsetDeviceCustomImage(String deviceName, String path) Information provided by the PKI file:voidshowClusterContents(String clustid) Information provided by the PKI file:voidInformation provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession
-
Constructor Details
-
LogicalWorkspaceImpl
public LogicalWorkspaceImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
getState
public int getState()Information provided by the PKI file:
\brief Returns the state of the Logical workspace. \return int, the state of the Logical workspace. States: sNone = 0, sHandScroll = 1, sAddNote = 2, sAddLine = 3, sAddEllipse = 4, sAddRectangle = 5, sDragging = 6, sDragged = 7, sConnect1 = 8, sConnect2 = 9, sAConnect1 = 10, sAConnect2 = 11, sInspect = 12, sDelete = 13, sPDU = 14, sAddDevice = 15, sAddDevices = 16, sMoveItem = 17, sZoom = 18, sZoomReset = 19, sDeviceTemplate = 20, sCtrlDrag = 21, sNameExists = 22, sResizeShape = 23, sRecable = 24, sFreeformPolygon = 100- Specified by:
getStatein interfaceLogicalWorkspace- Returns:
- int Returns a int
-
getCanvasItemIds
Information provided by the PKI file:
\brief Returns the list of UUIDs of items on the Logical workspace. \return vector<uuid>, the list of UUIDs of items on the Logical workspace.- Specified by:
getCanvasItemIdsin interfaceLogicalWorkspace- Returns:
- List<UUID> Returns a List<UUID>
-
getCanvasNoteIds
Information provided by the PKI file:
\brief Returns the list of UUIDs of note items on the Logical workspace. \return vector<uuid>, the list of UUIDs of note items on the Logical workspace.- Specified by:
getCanvasNoteIdsin interfaceLogicalWorkspace- Returns:
- List<UUID> Returns a List<UUID>
-
getCanvasRectIds
Information provided by the PKI file:
\brief Returns the list of UUIDs of rectangle items on the Logical workspace. \return vector<uuid>, the list of UUIDs of rectangle items on the Logical workspace.- Specified by:
getCanvasRectIdsin interfaceLogicalWorkspace- Returns:
- List<UUID> Returns a List<UUID>
-
getCanvasEllipseIds
Information provided by the PKI file:
\brief Returns the list of UUIDs of ellipse items on the Logical workspace. \return vector<uuid>, the list of UUIDs of ellipse items on the Logical workspace.- Specified by:
getCanvasEllipseIdsin interfaceLogicalWorkspace- Returns:
- List<UUID> Returns a List<UUID>
-
getCanvasLineIds
Information provided by the PKI file:
\brief Returns the list of UUIDs of line items on the Logical workspace. \return vector<uuid>, the list of UUIDs of line items on the Logical workspace.- Specified by:
getCanvasLineIdsin interfaceLogicalWorkspace- Returns:
- List<UUID> Returns a List<UUID>
-
getCanvasPolygonIds
Information provided by the PKI file:
\brief Returns the list of UUIDs of polygon items on the Logical workspace. \return vector<uuid>, the list of UUIDs of polygon items on the Logical workspace.- Specified by:
getCanvasPolygonIdsin interfaceLogicalWorkspace- Returns:
- List<UUID> Returns a List<UUID>
-
getRectItemData
Information provided by the PKI file:
\brief Returns a vector of data for a rectangle workspace item. \param itemID, ID of the rectangle to retrieve information for. \return vector<string>, Each string is part of the data, like the x position of the starting position, etc. index [0, 1] start x and y. index [2, 3] end x and y. index [4] inner color rgb 'r,g,b', empty string if not displayed. index [5] outer color rgb. 'r,g,b', empty string if not displayed. index [6] text- Specified by:
getRectItemDatain interfaceLogicalWorkspace- Parameters:
itemID- Takes in a parameter of itemID- Returns:
- List<String> Returns a List<String>
-
getEllipseItemData
Information provided by the PKI file:
\brief Returns a vector of data for a ellipse workspace item. \param itemID, ID of the ellipse to get information for. \return vector<string>, Each string is part of the data, like the x position of the starting position, etc. index [0, 1] start x and y. index [2, 3] end x and y. index [4] inner color rgb 'r,g,b', empty string if not displayed. index [5] outer color rgb. 'r,g,b', empty string if not displayed. index [6] text- Specified by:
getEllipseItemDatain interfaceLogicalWorkspace- Parameters:
itemID- Takes in a parameter of itemID- Returns:
- List<String> Returns a List<String>
-
getLineItemData
Information provided by the PKI file:
\brief Returns a vector of data for a line workspace item. \param itemID, ID of the line to get information for. \return vector<string>, Each string is part of the data, like the x position of the starting position, etc. index [0, 1] start x and y. index [2, 3] end x and y. index [4] Color rgb 'r,g,b'.- Specified by:
getLineItemDatain interfaceLogicalWorkspace- Parameters:
itemID- Takes in a parameter of itemID- Returns:
- List<String> Returns a List<String>
-
getPolygonItemData
Information provided by the PKI file:
\brief Returns a vector of data for a polygon workspace item. \param itemID, ID of the polygon to get information for. \return vector<string>, Each string is part of the data. index [0] inner color rgb. 'r,g,b', empty string if not displayed. index [1] outer color rgb. 'r,g,b', empty string if not displayed. index [2, vectorSize-1] These are the points of the polygon. [2] would be x, [3] would be y. All indexes after [1] are points in this fashion.- Specified by:
getPolygonItemDatain interfaceLogicalWorkspace- Parameters:
itemID- Takes in a parameter of itemID- Returns:
- List<String> Returns a List<String>
-
getCanvasItemX
Information provided by the PKI file:
\brief Returns the x-coordinate of the Logical workspace item with the specified UUID. \param item_id, the UUID of the Logical workspace item of interest. \return int, the x-coordinate of the Logical workspace item with the specified UUID.- Specified by:
getCanvasItemXin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_id- Returns:
- int Returns a int
-
getCanvasItemY
Information provided by the PKI file:
\brief Returns the y-coordinate of the Logical workspace item with the specified UUID. \param item_id, the UUID of the Logical workspace item of interest. \return int, the y-coordinate of the Logical workspace item with the specified UUID.- Specified by:
getCanvasItemYin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_id- Returns:
- int Returns a int
-
getCanvasItemRealX
Information provided by the PKI file:
\brief Returns the real x-coordinate of the Logical workspace item with the specified UUID. \param item_id, the UUID of the Logical workspace item of interest. \return int, the x-coordinate of the Logical workspace item with the specified UUID.- Specified by:
getCanvasItemRealXin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_id- Returns:
- int Returns a int
-
getCanvasItemRealY
Information provided by the PKI file:
\brief Returns the real y-coordinate of the Logical workspace item with the specified UUID. \param item_id, the UUID of the Logical workspace item of interest. \return int, the y-coordinate of the Logical workspace item with the specified UUID.- Specified by:
getCanvasItemRealYin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_id- Returns:
- int Returns a int
-
setCanvasItemRealPos
Information provided by the PKI file:
\brief Sets the x-coordinate of the Logical workspace item with the specified UUID. \param item_id, the UUID of the Logical workspace item of interest. \param x, the x-coordinate for the Logical workspace item. \param y, the y-coordinate for the Logical workspace item.- Specified by:
setCanvasItemRealPosin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_idx- Takes in a parameter of xy- Takes in a parameter of y
-
setCanvasItemX
Information provided by the PKI file:
\brief Sets the x-coordinate of the Logical workspace item with the specified UUID. \param item_id, the UUID of the Logical workspace item of interest. \param x, the x-coordinate for the Logical workspace item.- Specified by:
setCanvasItemXin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_idx- Takes in a parameter of x
-
setCanvasItemY
Information provided by the PKI file:
\brief Sets the y-coordinate of the Logical workspace item with the specified UUID. \param item_id, the UUID of the Logical workspace item of interest. \param y, the y-coordinate for the Logical workspace item.- Specified by:
setCanvasItemYin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_idy- Takes in a parameter of y
-
moveCanvasItemBy
Information provided by the PKI file:
\brief Moves the Logical workspace item with the specified UUID by the specified increments. \param item_id, the UUID of the Logical workspace item of interest. \param dx, the value to move the item in the x-axis by. \param dy, the value to move the item in the y-axis by.- Specified by:
moveCanvasItemByin interfaceLogicalWorkspace- Parameters:
item_id- Takes in a parameter of item_iddx- Takes in a parameter of dxdy- Takes in a parameter of dy
-
getComponentItemsCount
public int getComponentItemsCount()Information provided by the PKI file:
\brief Returns the number of component items on the Logical workspace. \return int, the number of component items on the Logical workspace.- Specified by:
getComponentItemsCountin interfaceLogicalWorkspace- Returns:
- int Returns a int
-
getComponentItem
Information provided by the PKI file:
\brief Returns the component item with the specified device name. \param deviceName, the name of the device of interest. \return ComponentItem, the ComponentItem object with the specified device name.- Specified by:
getComponentItemin interfaceLogicalWorkspace- Parameters:
deviceName- Takes in a parameter of deviceName- Returns:
- ComponentItem Returns a ComponentItem
-
getComponentChildCountFor
- Specified by:
getComponentChildCountForin interfaceLogicalWorkspace- Parameters:
clusterID- Takes in a parameter of clusterID- Returns:
- int Returns a int
-
getComponentChildForAt
- Specified by:
getComponentChildForAtin interfaceLogicalWorkspace- Parameters:
clusterID- Takes in a parameter of clusterIDindex- Takes in a parameter of index- Returns:
- ComponentItem Returns a ComponentItem
-
getComponentChildForByName
- Specified by:
getComponentChildForByNamein interfaceLogicalWorkspace- Parameters:
clusterID- Takes in a parameter of clusterIDname- Takes in a parameter of name- Returns:
- ComponentItem Returns a ComponentItem
-
addDevice
Information provided by the PKI file:
\brief Adds a device to the Logical workspace. \param type, the type of the device. Device types: eRouter = 0, eSwitch = 1, eCloud = 2, eBridge = 3, eHub = 4, eRepeater = 5, eCoAxialSplitter = 6, eAccessPoint = 7, ePc = 8, eServer = 9, ePrinter = 10, eWirelessRouter = 11, eIpPhone = 12, eDslModem = 13, eCableModem = 14, eRemoteNetwork = 15, eMultiLayerSwitch = 16, eLaptop = 17, eTabletPC = 18, ePda = 19, eWirelessEndDevice = 20, eWiredEndDevice = 21, eTV = 22, eHomeVoip = 23, eAnalogPhone = 24, eMultiUser = 25, eASA = 26, eIoE = 27, eHomeGateway = 28, eCellTower = 29, eCentralOfficeServer = 30 eCiscoAccessPoint = 31, eEmbeddedCiscoAccessPoint = 32, eSniffer = 33, eMCU = 34, eSBC = 35, eThing = 36, eMCUComponent = 37, eEmbeddedServer = 38, eWirelessLanController = 39, eCluster = 40 \param model, the model of the device. \param x, x coord to add the device at. \param y, y coord to add the device at. \return QString, the device name of the device.- Specified by:
addDevicein interfaceLogicalWorkspace- Parameters:
type- Takes in a parameter of typemodel- Takes in a parameter of modelx- Takes in a parameter of xy- Takes in a parameter of y- Returns:
- String Returns a String
-
removeDevice
Information provided by the PKI file:
\brief Removes the specified device from the Logical workspace and network. \param deviceName, the name of the device of interest. \return bool, true if successful, otherwise false.- Specified by:
removeDevicein interfaceLogicalWorkspace- Parameters:
deviceName- Takes in a parameter of deviceName- Returns:
- boolean Returns a boolean
-
addRemoteNetwork
Information provided by the PKI file:
\brief This event is emitted when action bar button on a android device is pressed, or corresponding button on some other device. \arg id, . \NOT APPLICABLE TO DESKTOP. event: actionBarButtonPressed(QString id) - PrivGetNetwork; \brief Adds a Multiuser remote network to the Logical workspace. \return QString, the name of the Multiuser remote network.- Specified by:
addRemoteNetworkin interfaceLogicalWorkspace- Returns:
- String Returns a String
-
removeRemoteNetwork
Information provided by the PKI file:
\brief Removes the Multiuser remote network with the specified name from the Logical workspace. \param name, the name of the Multiuser remote network to remove. \return bool, true if successful, otherwise false.- Specified by:
removeRemoteNetworkin interfaceLogicalWorkspace- Parameters:
name- Takes in a parameter of name- Returns:
- boolean Returns a boolean
-
moveRemoteNetwork
Information provided by the PKI file:
\brief Moves the Multiuser remote network to the specified location. \param name, the name of the Multiuser remote network of interest. \param x, the new x-coorindate for the Multiuser remote network. \param y, the new y-coordinate for the Multiuser remote network. \return bool, true if successful, otherwise false.- Specified by:
moveRemoteNetworkin interfaceLogicalWorkspace- Parameters:
name- Takes in a parameter of namex- Takes in a parameter of xy- Takes in a parameter of y- Returns:
- boolean Returns a boolean
-
createLink
public boolean createLink(String deviceName1, String portName1, String deviceName2, String portName2, ConnectType connType) Information provided by the PKI file:
\brief Creates a link from one device's port to another device's port. \param deviceName1, the name of the first device. \param portName1, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \param deviceName2, the name of the second device. \param portName2 portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \param connType, the connection type. Connection types: ETHERNET_STRAIGHT = 8100, ETHERNET_CROSS = 8101, ETHERNET_ROLL = 8102, FIBER = 8103, PHONE = 8104, CABLE = 8105, SERIAL = 8106, AUTO = 8107, CONSOLE = 8108, WIRELESS = 8109, COAXIAL = 8110, OCTAL = 8111, CELLULAR = 8112, USB = 8113, CUSTOM_IO = 8114, \return bool, true if successful, otherwise false.- Specified by:
createLinkin interfaceLogicalWorkspace- Parameters:
deviceName1- Takes in a parameter of deviceName1portName1- Takes in a parameter of portName1deviceName2- Takes in a parameter of deviceName2portName2- Takes in a parameter of portName2connType- Takes in a parameter of connType- Returns:
- boolean Returns a boolean
-
deleteLink
Information provided by the PKI file:
\brief Deletes a link from the device connected to the specified port. \param deviceName1, the name of the first device. \param portName1, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if successful, otherwise false.- Specified by:
deleteLinkin interfaceLogicalWorkspace- Parameters:
deviceName1- Takes in a parameter of deviceName1portName1- Takes in a parameter of portName1- Returns:
- boolean Returns a boolean
-
clearLayer
public boolean clearLayer(double layerNumber) Information provided by the PKI file:
\brief Clears the specified layer. \param layerNumber, the layer of interest. \return bool, true if successful, otherwise false.- Specified by:
clearLayerin interfaceLogicalWorkspace- Parameters:
layerNumber- Takes in a parameter of layerNumber- Returns:
- boolean Returns a boolean
-
drawLine
Information provided by the PKI file:
\brief Draws a line on the Logical workspace. \param sx, the x-coordinate to start drawing the line from. \param sy, the y-coordinate to start drawing the line from. \param ex, the x-coordinate to stop drawing the line at. \param ey, the y-coordinate to stop drawing the line at. \param layer, the layer to draw the line on. \param w, the width for the line. \param r, the red color value for the line. \param g, the green color value for the line. \param b, the blue color value for the line. \return uuid, the UUID of the line.- Specified by:
drawLinein interfaceLogicalWorkspace- Parameters:
sx- Takes in a parameter of sxsy- Takes in a parameter of syex- Takes in a parameter of exey- Takes in a parameter of eylayer- Takes in a parameter of layerw- Takes in a parameter of wr- Takes in a parameter of rg- Takes in a parameter of gb- Takes in a parameter of b- Returns:
- UUID Returns a UUID
-
drawCircle
Information provided by the PKI file:
\brief Draws a circle on the Logical workspace. \param cx, the x-coordinate of the center for the circle. \param cy, the y-coordinate of the center for the circle. \param layer, the layer to draw the circle on. \param radius, the radius for the circle. \param r, the red color value for the circle. \param g, the green color value for the circle. \param b, the blue color value for the circle. \return uuid, the UUID of the circle.- Specified by:
drawCirclein interfaceLogicalWorkspace- Parameters:
cx- Takes in a parameter of cxcy- Takes in a parameter of cylayer- Takes in a parameter of layerradius- Takes in a parameter of radiusr- Takes in a parameter of rg- Takes in a parameter of gb- Takes in a parameter of b- Returns:
- UUID Returns a UUID
-
addNote
Information provided by the PKI file:
\brief Adds a note on the Logical workspace. \param x, the x-coordinate for the note. \param y, the y-coordinate for the note. \param layer, the layer to add the note on. \param text, the text for the note. \return uuid, the UUID of the note.- Specified by:
addNotein interfaceLogicalWorkspace- Parameters:
x- Takes in a parameter of xy- Takes in a parameter of ylayer- Takes in a parameter of layertext- Takes in a parameter of text- Returns:
- UUID Returns a UUID
-
getCanvasNoteText
Information provided by the PKI file:
\brief Gets text from a note on the Logical workspace. \param uuid, the id of the canvas note. \return QString, the note text.- Specified by:
getCanvasNoteTextin interfaceLogicalWorkspace- Parameters:
id- Takes in a parameter of id- Returns:
- String Returns a String
-
getIncNoteZOrder
public double getIncNoteZOrder()Information provided by the PKI file:
\brief Gets and increments the current z order to use for a new note. \return uuid, the UUID of the note.- Specified by:
getIncNoteZOrderin interfaceLogicalWorkspace- Returns:
- double Returns a double
-
getMUItemCount
public int getMUItemCount()Information provided by the PKI file:
\brief Gets how many multiuser items there are, if any. \return int, the number of multiuser items.- Specified by:
getMUItemCountin interfaceLogicalWorkspace- Returns:
- int Returns a int
-
changeNoteText
Information provided by the PKI file:
\brief Changes text in a note on the logical workspace. \param id, ID of the \param text, the text for the note. \return uuid, the UUID of the note.- Specified by:
changeNoteTextin interfaceLogicalWorkspace- Parameters:
id- Takes in a parameter of idtext- Takes in a parameter of text- Returns:
- boolean Returns a boolean
-
removeCanvasItem
Information provided by the PKI file:
\brief Removes the specified item from the Logical workspace. \param id, the UUID of the item of interest. \return bool, true if successful, otherwise false.- Specified by:
removeCanvasItemin interfaceLogicalWorkspace- Parameters:
id- Takes in a parameter of id- Returns:
- boolean Returns a boolean
-
getUnusedLayer
public double getUnusedLayer()Information provided by the PKI file:
\brief Returns the unused layer. \return double, the unused layer.- Specified by:
getUnusedLayerin interfaceLogicalWorkspace- Returns:
- double Returns a double
-
isLayerUsed
public boolean isLayerUsed(double layer) Information provided by the PKI file:
\brief Returns true if the specified layer is used, otherwise false. \param layer, the layer of interest. \return true if the specified layer is used, otherwise false.- Specified by:
isLayerUsedin interfaceLogicalWorkspace- Parameters:
layer- Takes in a parameter of layer- Returns:
- boolean Returns a boolean
-
getLayerInbetweenComponents
Information provided by the PKI file:
\brief Returns the layer between the specified devices. \param deviceName1, the name of the first device. \param deviceName2, the name of the second device. \return double, the layer between the specified devices.- Specified by:
getLayerInbetweenComponentsin interfaceLogicalWorkspace- Parameters:
deviceName1- Takes in a parameter of deviceName1deviceName2- Takes in a parameter of deviceName2- Returns:
- double Returns a double
-
getWorkspaceImage
Information provided by the PKI file:
\brief Returns the series of bytes of the Logical workspace image. \param format, the format of the image. Image formats: BMP, GIF, JPG, JPEG, PNG, PBM, PGM, PPM, XBM, XPM. \return vector<byte>, the series of bytes of the Logical workspace image.- Specified by:
getWorkspaceImagein interfaceLogicalWorkspace- Parameters:
format- Takes in a parameter of format- Returns:
- List<Byte> Returns a List<Byte>
-
addTextPopup
Information provided by the PKI file:
\brief Adds a text popup to the Logical workspace. \param x, the x-coordinate for the text popup. \param y, the y-coordinate for the text popup. \param layer, the layer to add the text popup to. \param width, the width for the text popup. \param text, the text for the text popup. \return uuid, the UUID of the text popup.- Specified by:
addTextPopupin interfaceLogicalWorkspace- Parameters:
x- Takes in a parameter of xy- Takes in a parameter of ylayer- Takes in a parameter of layerwidth- Takes in a parameter of widthtext- Takes in a parameter of text- Returns:
- UUID Returns a UUID
-
removeTextPopup
Information provided by the PKI file:
\brief Removes the specified text popup from the Logical workspace. \param id, the UUID of the text popup of interest. \return bool, true if successful, otherwise false.- Specified by:
removeTextPopupin interfaceLogicalWorkspace- Parameters:
id- Takes in a parameter of id- Returns:
- boolean Returns a boolean
-
showClusterContents
Information provided by the PKI file:
\brief Shows the content of the specified cluster. \param clustid, the cluster ID of the cluster of interest.- Specified by:
showClusterContentsin interfaceLogicalWorkspace- Parameters:
clustid- Takes in a parameter of clustid
-
addCluster
public void addCluster()Information provided by the PKI file:
\brief Creates new cluster object with the currently selected objects.- Specified by:
addClusterin interfaceLogicalWorkspace
-
removeCluster
Information provided by the PKI file:
\brief Removes csluter object with given id. \param clusterId, The cluster ID of the cluster of interest. \param uncluster, When false - the cluster with everything inside will be killed. When true - is equivalent to unCluster.- Specified by:
removeClusterin interfaceLogicalWorkspace- Parameters:
clusterId- Takes in a parameter of clusterIduncluster- Takes in a parameter of uncluster
-
unCluster
Information provided by the PKI file:
\brief Unclusters cluster with the given clusterId. \arg clusterId, Cluster id for which to do unclustering operation.- Specified by:
unClusterin interfaceLogicalWorkspace- Parameters:
clusterId- Takes in a parameter of clusterId
-
getRootCluster
Information provided by the PKI file:
\brief Returns root cluster- Specified by:
getRootClusterin interfaceLogicalWorkspace- Returns:
- Cluster Returns a Cluster
-
getCurrentCluster
Information provided by the PKI file:
\brief Returns root cluster- Specified by:
getCurrentClusterin interfaceLogicalWorkspace- Returns:
- Cluster Returns a Cluster
-
getCluster
Information provided by the PKI file:
\brief Returns cluster object for a given cluster id. \arg clusterId of a cluster object.- Specified by:
getClusterin interfaceLogicalWorkspace- Parameters:
clusterId- Takes in a parameter of clusterId- Returns:
- Cluster Returns a Cluster
-
getClusterItemId
Information provided by the PKI file:
\brief Returns uuid for the item associated with this cluster object. \param clusterId, ID of a cluster object for which we want to get an item. \return uuid, the uuid for the item associated with the given cluster.- Specified by:
getClusterItemIdin interfaceLogicalWorkspace- Parameters:
clusterId- Takes in a parameter of clusterId- Returns:
- UUID Returns a UUID
-
getClusterFromItem
Information provided by the PKI file:
\brief Returns cluster object assosiatete with a given cluster item. \param clusterItemUuid, the uuid for the cluster item of interest. For non-cluster items this will return NULL. \return Cluster, the cluster object assosiatete with a given cluster item.- Specified by:
getClusterFromItemin interfaceLogicalWorkspace- Parameters:
clusterItemUuid- Takes in a parameter of clusterItemUuid- Returns:
- Cluster Returns a Cluster
-
getClusterForItem
Information provided by the PKI file:
\brief Returns cluster object this item belongs to. \param itemUuid, the uuid an item. This can be a uuid of any canvas item, Device uuid or Cluster uuid. \return Cluster, cluster object the given item belongs to.- Specified by:
getClusterForItemin interfaceLogicalWorkspace- Parameters:
itemUuid- Takes in a parameter of itemUuid- Returns:
- Cluster Returns a Cluster
-
getClusterIdForItem
Information provided by the PKI file:
\brief Returns cluster id for a given workspace item. \param itemUuid of an item. This can be a uuid of canvas item, Device or Cluster. \return QString, cluster id for a given workspace item.- Specified by:
getClusterIdForItemin interfaceLogicalWorkspace- Parameters:
itemUuid- Takes in a parameter of itemUuid- Returns:
- String Returns a String
-
moveItemToCluster
Information provided by the PKI file:
\brief Moves item from current cluster to a cluster with given clusterId. \param itemUuid of an item. This can be a uuid of canvas item, Device or Cluster. \param clusterId, Cluster ID of the cluster to add the item to.- Specified by:
moveItemToClusterin interfaceLogicalWorkspace- Parameters:
itemUuid- Takes in a parameter of itemUuidclusterId- Takes in a parameter of clusterId
-
autoConnectDevices
Information provided by the PKI file:
\brief Auto connect function, connect the given devices with a default cable at default ports, if possible. \param device1 The originating device \param device2 the destination device- Specified by:
autoConnectDevicesin interfaceLogicalWorkspace- Parameters:
device1- Takes in a parameter of device1device2- Takes in a parameter of device2
-
setDeviceCustomImage
Information provided by the PKI file:
\brief Change Device image in logical workspace \param deviceName, the name of the device to set the custom image for. \param path, path to the image to use.- Specified by:
setDeviceCustomImagein interfaceLogicalWorkspace- Parameters:
deviceName- Takes in a parameter of deviceNamepath- Takes in a parameter of path
-
centerOn
public void centerOn(double dx, double dy) - Specified by:
centerOnin interfaceLogicalWorkspace- Parameters:
dx- Takes in a parameter of dxdy- Takes in a parameter of dy
-
centerOnComponentByName
- Specified by:
centerOnComponentByNamein interfaceLogicalWorkspace- Parameters:
name- Takes in a parameter of name
-
getCurrentZoom
public int getCurrentZoom()Information provided by the PKI file:
\return int, 0 means default zoom. a positive number indicates zoom in level. a negative number indicates zoom out level.- Specified by:
getCurrentZoomin interfaceLogicalWorkspace- Returns:
- int Returns a int
-